import './data/index'
import * as mq from './mq/index';
import * as service from './service/index';

setTimeout(async () => {
    const mqs =
    {
        word2jpg: service.wordToImage,
        autoCrop: service.autoCrop,
        autoMarkPeer: service.autoMarkPeer,
        file2qiniu: service.file2qiniu,
        qiniuCb: service.qiniuCb,
        fuck: async function(msg) {
            console.log(msg);
        }
    }

    for(let p in mqs) {
        console.log(p, mqs[p]);
        await mq.consumer(p, async function(msg) {
            await mqs[p](msg);
        });
    }
}, 2*1000);